package cn.zl.ZLM.event.callback.impl;

import cn.zl.ZLM.core.ZLMApi;
import cn.zl.ZLM.event.callback.inter.IMKGetStatisticCallBack;
import cn.zl.ZLM.helper.ZLMApiHelper;
import cn.zl.ZLM.structure.MK_INI;
import com.sun.jna.Pointer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class MKGetStatisticCallBack implements IMKGetStatisticCallBack {

    private static final Logger logger = LoggerFactory.getLogger(MKGetStatisticCallBack.class);

    @Override
    public void invoke(Pointer user_data, MK_INI ini) {
        ZLMApi ZLM_API = ZLMApiHelper.getInstance().getApi();
        String mediaSource = ZLM_API.mk_ini_get_option(ini, "object.MediaSource");
        String multiMediaSourceMuxer = ZLM_API.mk_ini_get_option(ini, "object.MultiMediaSourceMuxer");
        String tcpServer = ZLM_API.mk_ini_get_option(ini, "object.TcpServer");
        String tcpSession = ZLM_API.mk_ini_get_option(ini, "object.TcpSession");
        String udpServer = ZLM_API.mk_ini_get_option(ini, "object.UdpServer");
        String udpSession = ZLM_API.mk_ini_get_option(ini, "object.UdpSession");
        String tcpClient = ZLM_API.mk_ini_get_option(ini, "object.TcpClient");
        String socket = ZLM_API.mk_ini_get_option(ini, "object.Socket");
        String frameImp = ZLM_API.mk_ini_get_option(ini, "object.FrameImp");
        String frame = ZLM_API.mk_ini_get_option(ini, "object.Frame");
        String buffer = ZLM_API.mk_ini_get_option(ini, "object.Buffer");
        String bufferRaw = ZLM_API.mk_ini_get_option(ini, "object.BufferRaw");
        String bufferLikeString = ZLM_API.mk_ini_get_option(ini, "object.BufferLikeString");
        String bufferList = ZLM_API.mk_ini_get_option(ini, "object.BufferList");
        String rtpPacket = ZLM_API.mk_ini_get_option(ini, "object.RtpPacket");
        String rtmpPacket = ZLM_API.mk_ini_get_option(ini, "object.RtmpPacket");
        ZLM_API.mk_ini_release(ini);
        logger.info("mediaSource:{}", mediaSource);
    }
}
